package com.jlcloud.core.context;

import org.springframework.http.HttpHeaders;
import org.springframework.lang.Nullable;

import jakarta.servlet.http.HttpServletRequest;

/**
 * HttpHeaders 获取器，用于跨服务和线程的传递，
 * <p>
 * 暂时不支持 webflux。
 *
 * @author By: JlCloud <br>
 * @Package: com.jlcloud <br>
 * @CreateTime: 2024-12-03 21:45 <br>
 * @Copyright: 2021 www.jilianjituan.com Inc. All rights reserved. <br>
 * @Caution 注意：本内容仅限于冀联人力集团内部传阅，禁止外泄以及用于其他的商业目的 <br>
 */
public interface JlCloudHttpHeadersGetter {

	/**
	 * 获取 HttpHeaders
	 *
	 * @return HttpHeaders
	 */
	@Nullable
	HttpHeaders get();

	/**
	 * 获取 HttpHeaders
	 *
	 * @param request 请求
	 * @return HttpHeaders
	 */
	@Nullable
	HttpHeaders get(HttpServletRequest request);

}
